SET IDENTITY_INSERT [CMS_Query] ON
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (46, N'selectbyusername', 0, N'SELECT * FROM CMS_User WHERE UserName = @UserName', 0, 59, 0, '20080313 09:35:00', '7316064b-b7ef-4dfd-8c81-70bb13ead76f', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (49, N'selectsites', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Site WHERE (##WHERE##) AND SiteID IN (SELECT SiteID FROM CMS_UserSite WHERE UserID=@UserID) ORDER BY ##ORDERBY##', 0, 59, 0, '20090102 09:27:04', 'c9baaab7-9f57-4f4e-a553-837c623ef119', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (443, N'selectpreviousstep', 0, N'SELECT TOP 1 * FROM CMS_WorkflowStep WHERE StepWorkflowID IN (SELECT StepWorkflowID FROM CMS_WorkflowStep WHERE StepID = @StepID) AND StepOrder < (SELECT StepOrder FROM CMS_WorkflowStep WHERE StepID = @StepID) ORDER BY StepOrder DESC', 0, 172, 0, '20080313 09:35:00', '11732210-33ce-43ee-b0e2-c90ea24f2b86', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (446, N'selectnextstep', 0, N'SELECT TOP 1 * FROM CMS_WorkflowStep WHERE StepWorkflowID IN (SELECT StepWorkflowID FROM CMS_WorkflowStep WHERE StepID = @StepID) AND StepOrder > (SELECT StepOrder FROM CMS_WorkflowStep WHERE StepID = @StepID) ORDER BY StepOrder ASC', 0, 172, 0, '20080313 09:35:00', '7e696e43-b30a-4efb-ba33-f18102044ef6', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (459, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_ACLItem WHERE [ACLItemID] = @ID', 0, 225, 0, '20081229 09:06:53', 'd819e096-f782-4794-8d75-769933d417b9', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (793, N'selectbyguid', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Attachment WHERE AttachmentGUID = @AttachmentGUID AND AttachmentSiteID = @AttachmentSiteID', 0, 504, 0, '20090409 16:10:03', 'da7aade2-8749-4561-ad1b-82935a311443', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (780, N'selectByName', 0, N'SELECT ##TOPN## ##COLUMNS## FROM [CMS_WebTemplate] WHERE WebTemplateDisplayName = @WebTemplateDisplayName', 0, 500, 0, '20091012 08:13:09', '01f1d2c1-5ccc-4a11-98ac-8cc5f2fb3ca8', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2480, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Forums_ForumPost WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1123, 0, '20100210 17:47:07', '6d300dfc-78fe-429b-ade7-c03f99235fb9', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1760, N'SelectControlsForSite', 0, N'SELECT Control.* FROM CMS_InlineControl Control, CMS_InlineControlSite ControlSite WHERE ControlSite.SiteID = @SiteID AND ControlSite.ControlID = Control.ControlID', 0, 877, 0, '20080313 09:35:00', '4dba8933-063d-4137-bd6d-e3a33f336bde', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2900, N'selectallnodata', 0, N'SELECT ##TOPN## TaskID, TaskSiteID, TaskDocumentID, TaskNodeAliasPath, TaskTitle, TaskTime, TaskType, TaskNodeID FROM Staging_Task WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1134, 0, '20100322 15:43:49', 'e8df4e5a-0bf1-4f4d-9872-2d215218c65d', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3344, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Polls_PollAnswer WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1331, 0, '20090102 11:33:22', 'e527b3e7-ceee-415a-ba6e-8ef5f3398b8c', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4162, N'selectformroles', 0, N'SELECT * FROM CMS_Role, CMS_FormRole WHERE CMS_FormRole.FormID = @FormID AND CMS_Role.RoleID = CMS_FormRole.RoleID', 0, 880, 0, '20080313 09:35:00', 'ece81c03-00d0-4ae7-9319-58d8b0dfd6f6', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4217, N'select', 0, N'SELECT ##COLUMNS## FROM Events_Attendee WHERE [AttendeeID] = @ID', 0, 1511, 0, '20081229 09:07:06', '3f149c3c-97cc-42bf-8990-952f834c83a0', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4781, N'selectresourcesites', 0, N'SELECT * FROM View_CMS_ResourceSite_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 134, 0, '20080313 09:35:00', 'e3919870-cdfa-400a-a266-fddc8a602c09', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4800, N'selectusersites', 0, N'SELECT * FROM View_CMS_UserSite_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 59, 0, '20080313 09:35:00', '9ebe092d-2d37-49a1-b426-208db9eb9382', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4801, N'selectcategorypath', 1, N'Proc_CMS_PageTemplateCategory_SelectCategoryPath', 0, 405, 0, '20080313 09:35:00', 'ef487ca8-c10c-4cd4-b01d-e27df469ba3f', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4802, N'selectcategorypath', 1, N'Proc_CMS_WebPartCategory_SelectCategoryPath', 0, 424, 0, '20080313 09:35:00', 'b994b95e-2237-486a-a74c-ca145729a05a', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4804, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_WebPartCategory WHERE [CategoryID] = @ID', 0, 424, 0, '20090827 15:32:53', '303bf4ce-940b-4142-889a-804ab13d5914', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4986, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Events_Attendee WHERE (AttendeeLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 1511, 0, '20081229 09:07:06', 'e6820965-932a-4fe7-9ff3-b9076cb59498', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4806, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WorkflowScope WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 175, 0, '20090415 18:09:40', 'b8b4157f-052c-4178-887f-ef89b8606f1e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4809, N'selectsteprolesbinding', 0, N'SELECT * FROM View_CMS_WorkflowStepRoles_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 172, 0, '20080313 09:35:00', '78ba4506-12ac-49b0-aec2-0bf3487c28f8', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5153, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_ClassSite WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1637, 0, '20081229 09:06:58', '820661ad-cc34-43ed-b4be-cb572c1dc722', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5154, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_FormRole WHERE [FormID] = @FormID AND [RoleID] = @RoleID', 0, 1638, 0, '20081229 09:07:07', '8c856a34-ae8c-4f80-ba59-3fc07b272e15', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5158, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_FormRole WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1638, 0, '20081229 09:07:07', 'a8f88527-f62d-46eb-bc25-8889d7d1c529', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5163, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_AllowedChildClasses WHERE [ParentClassID] = @ParentClassID AND [ChildClassID] = @ChildClassID', 0, 1639, 0, '20081229 09:06:53', '87456035-45a6-4717-a839-7eba0156e299', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5167, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_AllowedChildClasses WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1639, 0, '20081229 09:06:53', '99592595-3c43-4020-9552-9e7b0beb4dde', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5278, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Forums_ForumModerators WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1659, 0, '20081229 09:07:08', 'cf45e609-570f-4444-931e-14e48616c820', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5286, N'selectbyname', 0, N'SELECT * FROM CMS_SettingsCategory WHERE CategoryName = @CategoryName', 0, 1649, 0, '20080321 00:00:00', '882370cd-559f-48a4-ac31-817154cf6b2e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5301, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WorkflowScope WHERE (ScopeLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 175, 0, '20081229 09:07:41', '6e96089c-7028-453e-8d58-39a96c095a25', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5306, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM COM_PaymentShipping WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1661, 0, '20081229 09:07:15', 'ad343131-c6a9-4921-92a6-2ca4f5aef51d', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6176, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_TagGroup WHERE [TagGroupID] = @ID', 0, 1736, 0, '20081229 09:07:24', '9b0105a1-8b1f-4e59-997b-73591803a978', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6186, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_DocumentTag WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1737, 0, '20081229 09:06:59', 'c0637919-d174-4abc-8a58-26e057266bb0', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6190, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_Tag WHERE [TagID] = @ID', 0, 1738, 0, '20081229 09:07:24', '63f98b83-fe5e-4956-9f6b-502dac93cb15', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6299, N'selectbywildcardrule', 0, N'SELECT NodeAliasPath, DocumentCulture, DocumentURLPath, DocumentExtensions, DocumentCampaign FROM View_CMS_Tree_Joined WHERE @WildcardRule LIKE [DocumentWildcardRule] AND (##WHERE##) ORDER BY DocumentPriority DESC', 0, 143, 0, '20081022 15:48:20', 'b9f820da-c676-41b9-af50-e91bd802dd81', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6180, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_TagGroup WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1736, 0, '20081229 09:07:24', 'f864fe45-165e-4125-93ff-ba3ace694710', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6181, N'selectbyname', 0, N'SELECT ##COLUMNS## FROM CMS_TagGroup WHERE [TagGroupName] = @Name AND [TagGroupSiteID] = @SiteID', 0, 1736, 0, '20080806 14:27:57', '0f6da8b4-f21a-46c0-ac25-d3519de0c5b1', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6182, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_DocumentTag WHERE [DocumentID] = @DocumentID AND [TagID] = @TagID', 0, 1737, 0, '20081229 09:06:59', '775bf7cd-36eb-4c98-8877-4b7a10352867', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7058, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_EmailUser WHERE [EmailID] = @EmailID AND [UserID] = @UserID', 0, 1926, 0, '20081229 09:07:04', '4424e0cb-8f97-476d-b40a-86b9d8aa16e0', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7360, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Query WHERE (QueryLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 161, 0, '20090102 14:02:46', '18a0ce5e-4364-48bf-b446-1c20e17a30a4', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7361, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_SiteDomainAlias WHERE (SiteDomainLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 661, 0, '20091012 07:45:30', '34487b1a-1d8f-4faa-8de0-516cd13bef54', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7363, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_TagGroup WHERE (TagGroupLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 1736, 0, '20081229 09:07:24', 'c431eab0-75a0-4d67-815d-3429c502a4d8', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7364, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_TimeZone WHERE (TimeZoneLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 1747, 0, '20081229 09:07:39', '333316b8-a262-4fff-afaa-5b2b5e6001e4', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7367, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WorkflowStep WHERE (StepLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 172, 0, '20091012 09:04:33', '3f9a88cc-5893-4d31-ba39-9bc4b90c3dcb', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7374, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Badge WHERE (BadgeLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 1787, 0, '20090421 12:20:12', '090a9e8e-75dc-435a-950a-40c025882c0c', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5204, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Polls_PollSite WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1646, 0, '20081229 09:07:16', 'b0e91492-c3eb-4ca5-afa9-f8f90b882190', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4860, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_UICulture WHERE (UICultureLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 490, 0, '20081229 09:07:39', '7148e790-3d98-4b99-a0cd-0c3622873933', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4868, N'selectclasssites', 0, N'SELECT * FROM View_CMS_ClassSite_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 145, 0, '20080313 09:35:00', '5cae2295-db42-4a3f-965e-57db1f19358e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4871, N'selectclasschildclasses', 0, N'SELECT * FROM View_CMS_AllowedChildClasses_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 145, 0, '20080313 09:35:00', '92b8f360-bcac-4544-ad09-a0951f845f50', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (8636, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_UserCulture WHERE [UserID] = @UserID AND [CultureID] = @CultureID AND [SiteID] = @SiteID', 0, 2132, 0, '20090420 14:23:10', 'f96f8a54-fc9a-4d43-80a8-4bb0e63f8f02', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (8637, N'delete', 0, N'DELETE FROM CMS_UserCulture WHERE [UserID] = @UserID AND [CultureID] = @CultureID AND [SiteID] = @SiteID', 0, 2132, 0, '20090420 14:23:00', '870da0b8-a6d8-48c6-89d7-637a1a292f54', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (9261, N'removedocumentdependencies', 0, N'DELETE FROM CMS_Personalization WHERE PersonalizationDocumentID = @ID', 0, 1841, 0, '20091015 17:04:28', '7d112363-9611-4b53-b472-019a7bfed066', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (9263, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WidgetCategory WHERE (WidgetCategoryLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 2198, 0, '20091016 11:33:26', '45b4e0bd-65a4-44ce-9b8f-d7faf8822cff', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (9475, N'deletesession', 1, N'Proc_CMS_Session_Delete', 0, 59, 0, '20091202 13:54:17', '151b2a78-1a07-4319-8698-b72513981849', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7905, N'selectallview', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_Community_Group WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1748, 0, '20081231 15:27:06', 'b71661f4-4f04-4c17-99f7-a4108493876e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (190, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Resource WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 134, 0, '20091124 19:02:33', '2964d73a-04b4-4ab7-8a7f-bbb566ee237e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (193, N'selectresources', 0, N'SELECT * FROM CMS_Resource WHERE ResourceID IN (SELECT ResourceID FROM CMS_ResourceSite WHERE SiteID = @SiteID) ORDER BY ResourceDisplayName', 0, 52, 0, '20080313 09:35:00', '5b668739-21c2-4051-8179-5a9d64bcd14e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (194, N'selectclasses', 0, N'SELECT * FROM CMS_Class WHERE ClassIsDocumentType = 1 AND ClassID IN (SELECT ClassID FROM CMS_ClassSite WHERE SiteID = @SiteID) ORDER BY ClassDisplayName', 0, 52, 0, '20080313 09:35:00', '2234c024-08f7-439c-9918-bd97dd89baae', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6910, N'selectpagetemplatedocument', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_PageTemplate INNER JOIN CMS_Document ON CMS_PageTemplate.PageTemplateID = CMS_Document.DocumentPageTemplateID INNER JOIN CMS_Tree ON CMS_Document.DocumentNodeID = CMS_Tree.NodeID INNER JOIN CMS_Site ON CMS_Tree.NodeSiteID = CMS_Site.SiteID ##WHERE## ##ORDERBY##', 0, 157, 0, '20100303 14:34:17', 'df38abcb-75ae-4ae4-b229-f9857923e7bc', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (123, N'SelectUserNameById', 0, N'SELECT UserName FROM CMS_User WHERE UserID = @UserID', 0, 59, 0, '20080313 09:35:00', 'ddcc8d69-e89c-4988-af4a-3697c9c4c8f3', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (125, N'SelectRoleNameById', 0, N'SELECT RoleName FROM CMS_Role WHERE RoleID = @RoleID', 0, 56, 0, '20080313 09:35:00', '3a40934e-ab93-4a09-b58a-769f98afff03', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (129, N'selectbyid', 0, N'SELECT * FROM CMS_Role WHERE RoleID = @RoleID', 0, 56, 0, '20080313 09:35:00', 'f978463f-66b4-482b-9507-1894a373bc44', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (131, N'selectbyrole', 0, N'SELECT ##TOPN## * FROM CMS_User WHERE UserID IN (SELECT UserID FROM CMS_UserRole WHERE (##WHERE##)) ORDER BY ##ORDERBY##', 0, 59, 0, '20081121 09:04:27', 'ca5aa200-7fe1-4c51-82a5-b41e97889bf2', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (158, N'selectbyname', 0, N'SELECT TOP 1 CMS_EmailTemplate.* FROM CMS_EmailTemplate LEFT JOIN CMS_Site ON EmailTemplateSiteID=SiteID WHERE (EmailTemplateName=@EmailTemplateName) AND (SiteName=@SiteName OR EmailTemplateSiteID IS NULL) ORDER BY EmailTemplateSiteID DESC', 0, 129, 0, '20080313 09:35:00', 'f1686e21-c931-4eb1-9744-2c9bf33aa8a9', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (175, N'SelectInfoForResource', 0, N'SELECT P.* FROM [CMS_Resource] R, [CMS_Site] S , [CMS_ResourceSite] RS, [CMS_Permission] P WHERE (P.PermissionName = @PermissionName) AND (R.ResourceName=@ResourceName AND P.ResourceID = R.ResourceID)  AND (RS.ResourceID = R.ResourceID) AND (S.SiteName = @SiteName AND RS.SiteID = S.SiteID)', 0, 131, 0, '20080313 09:35:00', '95a3db79-575d-444a-8ece-637d9b106134', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (177, N'SelectInfoForClass', 0, N'SELECT P.* FROM [CMS_Class] C, [CMS_Site] S , [CMS_ClassSite] CS, [CMS_Permission] P WHERE (P.PermissionName = @PermissionName) AND (C.ClassName=@ClassName AND P.ClassID = C.ClassID)  AND (CS.ClassID = C.ClassID) AND (S.SiteName = @SiteName AND CS.SiteID = S.SiteID)', 0, 131, 0, '20080313 09:35:00', '8c7a4176-17ae-451f-85e4-63c332ea6993', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (184, N'selectByName', 0, N'SELECT  * FROM [CMS_Resource] WHERE ResourceName = @ResourceName', 0, 134, 0, '20080313 09:35:00', '8091d4cf-c570-45ad-ae96-52c45e4f384f', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (185, N'selectById', 0, N'SELECT * FROM [CMS_Permission] WHERE PermissionID = @PermissionID;', 0, 131, 0, '20080313 09:35:00', '943e6b57-4a7f-42e4-8c83-07f4e74917fd', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (186, N'selectById', 0, N'SELECT  * FROM [CMS_Resource] WHERE ResourceID = @ResourceID', 0, 134, 0, '20080313 09:35:00', '0d22071e-89bb-41f1-a9e1-6effbd2b0508', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (215, N'selectdocuments', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_CMS_Tree_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 144, 0, '20090729 12:28:40', '600f3986-e5eb-4a3b-afb4-8ec2c3d5291b', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (8039, N'selectuniquefilename', 1, N'Proc_CMS_Attachment_SelectUniqueFileName', 0, 504, 0, '20090416 16:02:54', '7cd305c9-ea19-4126-b64a-088bddf91c4f', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (206, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_EventLog WHERE [EventID] = @ID', 0, 140, 0, '20100219 08:36:37', '1456953b-4770-4d6b-a3e4-30dd42417c3d', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (207, N'insert', 0, N'INSERT INTO CMS_EventLog ([EventType], [EventTime], [Source], [EventCode], [UserID], [UserName], [IPAddress], [NodeID], [DocumentName], [EventDescription], [SiteID], [EventUrl], [EventMachineName], [EventUserAgent], [EventUrlReferrer] ) VALUES ( @EventType, @EventTime, @Source, @EventCode, @UserID, @UserName, @IPAddress, @NodeID, @DocumentName, @EventDescription, @SiteID, @EventUrl, @EventMachineName, @EventUserAgent, @EventUrlReferrer); SELECT SCOPE_IDENTITY() AS [EventID]', 1, 140, 0, '20100219 08:36:37', '977c90ee-c602-47d5-99fe-f3e8bcb6f2a9', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (208, N'selectunigrid', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_CMS_EventLog_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 140, 0, '20090918 14:43:13', '3c72014f-2dc8-42be-bda6-ac170084ac38', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (403, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_WorkflowStep WHERE [StepID] = @ID', 0, 172, 0, '20081229 09:07:41', 'cbe41149-53b7-425e-b2d3-46c0fde1b6a3', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (412, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_WorkflowScope WHERE [ScopeID] = @ID', 0, 175, 0, '20090415 18:09:45', 'bc66d50d-96df-49b8-a5bc-b423b6322895', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1293, N'selectByControlName', 0, N'SELECT * FROM CMS_InlineControl WHERE ControlName = @ControlName', 0, 877, 0, '20080313 09:35:00', 'e10e5037-a9da-47fc-a20b-4b4fda8d21d5', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2283, N'selectbyname', 0, N'SELECT * FROM [CMS_Site] WHERE [SiteName] = @SiteName', 0, 52, 0, '20080313 09:35:00', 'a19caa49-ba04-44d6-92ff-26d91b9ba4ed', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2284, N'selectbyname', 0, N'SELECT * FROM CMS_CssStylesheet WHERE StylesheetName = @StylesheetName', 0, 555, 0, '20080313 09:35:00', '595c2087-b5ee-492b-86c6-c2f86382b5fe', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2288, N'selectForSite', 0, N'SELECT * FROM CMS_Transformation WHERE TransformationName = @TransformationName AND TransformationClassID = (SELECT [ClassId] FROM CMS_Class Where ClassName =  @TransformationClassName)', 0, 162, 0, '20080313 09:35:00', 'bb2a9b9e-e3e4-4c58-82ee-7b031b95c385', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2289, N'selectbyname', 0, N'SELECT * FROM [CMS_WebPartContainer] WHERE [ContainerName] = @ContainerName', 0, 929, 0, '20080313 09:35:00', '06ebf103-6fa6-4d68-b9d4-503785675a38', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2292, N'selectRunningSiteForDomain', 0, N'SELECT * FROM CMS_Site WHERE (SiteDomainName=@SiteDomainName OR SiteID IN (SELECT SiteID FROM CMS_SiteDomainAlias WHERE SiteDomainAliasName=@SiteDomainName)) AND SiteStatus=''RUNNING''', 0, 52, 0, '20090902 11:17:12', 'ce54e6e6-4c3a-4c5d-986e-909065c8b3df', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2298, N'selectbyname', 0, N'SELECT * FROM [CMS_Culture] WHERE CultureCode = @CultureCodeName', 0, 1, 0, '20080313 09:35:00', '47569406-f1c1-4453-9704-5206910c476c', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2299, N'selectbyname', 0, N'SELECT * FROM [CMS_WebPart] WHERE WebPartName = @WebPartName', 0, 425, 0, '20090102 10:31:38', 'ca0cc5d6-4723-41c1-b02c-482779b5a58e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2302, N'selectByDomain', 0, N'SELECT * FROM CMS_LicenseKey WHERE LicenseDomain = @LicenseDomain', 0, 930, 0, '20080313 09:35:00', '77dda987-f84c-400f-9327-bd13917c862b', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (622, N'selectByCodeName', 0, N'SELECT  * FROM [CMS_Layout] WHERE LayoutCodeName = @LayoutCodeName', 0, 410, 0, '20080313 09:35:00', 'f4eb5d60-f467-4be3-b9e2-8cded4113caf', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5050, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_CssStylesheetSite WHERE [StylesheetID] = @StylesheetID AND [SiteID] = @SiteID', 0, 1629, 0, '20081229 09:06:58', 'ca9cd0d6-21f4-49ed-969c-eac17b1c3561', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5054, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_CssStylesheetSite WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1629, 0, '20081229 09:06:58', '4c744ee3-63a8-4b7a-8936-6e08868f567f', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5059, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_InlineControlSite WHERE [ControlID] = @ControlID AND [SiteID] = @SiteID', 0, 1630, 0, '20081229 09:07:09', 'd0d2185b-8eee-4a57-bc9a-13d1963393a4', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5063, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_InlineControlSite WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1630, 0, '20081229 09:07:09', 'ece8741a-62c2-4e42-b906-7cfee49b42f0', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2755, N'selectcountrystates', 0, N'SELECT * FROM CMS_State WHERE CountryID=@CountryID', 0, 1125, 0, '20080313 09:35:00', '443089b6-0ff5-4e0b-a1d4-7525df9b1976', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2699, N'selectrelationships', 0, N'SELECT * FROM View_CMS_Relationship_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 537, 0, '20080313 09:35:00', '9ef487a5-3d9d-4dab-a951-d1c3ba9afba1', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2706, N'selectbyguid', 0, N'SELECT * FROM CMS_Tree WHERE NodeGUID = @NodeGUID AND NodeSiteID = @NodeSiteID', 0, 143, 0, '20080313 09:35:00', '2a1d74ed-e628-413d-93bd-58968d814424', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2710, N'selectbydepartment', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_User WHERE UserID IN (SELECT UserID FROM COM_UserDepartment WHERE (##WHERE##)) ORDER BY ##ORDERBY##', 0, 59, 0, '20091103 08:35:51', '8ae1bbcb-08b3-4557-89df-6ca10630a3b7', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2936, N'selectResourcesForSite', 0, N'SELECT * FROM CMS_Resource WHERE ResourceID IN (SELECT ResourceID FROM CMS_ResourceSite WHERE SiteID=@SiteID) AND ##WHERE##  ORDER BY ##ORDERBY##', 0, 134, 0, '20090827 18:32:36', '55065f23-91e3-4aac-aa76-e8aab8a66c5d', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2955, N'selectorderlist', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_COM_Order_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1158, 0, '20091103 08:59:28', '10395aae-9e57-4c5f-805b-04d14cadde1f', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (239, N'selectbydocumentnodeid', 0, N'SELECT ##COLUMNS## FROM CMS_Document WHERE DocumentNodeID = @DocumentNodeID', 0, 144, 0, '20090429 09:10:54', '88b746ea-00ab-449d-9dc2-50dbc0667c1a', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (253, N'selectusersinrole', 0, N'SELECT UserName FROM CMS_User, CMS_UserRole WHERE CMS_User.UserID = CMS_UserRole.UserID AND RoleID = @RoleID', 0, 59, 0, '20080313 09:35:00', '68de7460-30cf-4aac-a862-e952c0fa8e55', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (269, N'selectsitecultures', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Culture WHERE CultureID IN (SELECT CultureID FROM CMS_SiteCulture WHERE SiteID=@SiteID)', 0, 1, 0, '20091103 08:51:43', '41416e5f-2a52-45b2-adb7-e1af2c7e293b', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (271, N'selectbyid', 0, N'SELECT * FROM CMS_PageTemplate WHERE PageTemplateID=@PageTemplateId', 0, 157, 0, '20080313 09:35:00', '8ec56c64-5262-47af-b64a-2686b5ecc506', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (237, N'selectbyurlpathandsiteid', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_CMS_Tree_Joined WHERE (NodeSiteID = @NodeSiteID) AND (DocumentUrlPath = @DocumentUrlPath) AND (NodeLinkedNodeID IS NULL)', 0, 144, 0, '20090819 19:07:18', '001ce0ac-0067-4ffa-b6bd-c5b4b7ea358f', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (372, N'selectrunningdomainnames', 0, N'SELECT TOP 1 SiteID, SiteDomainName as ''SiteDomainAliasName'' FROM CMS_Site 
WHERE SiteID != @SiteID AND SiteStatus = ''RUNNING'' AND 
(
	SiteDomainName=@DomainName OR 
	SiteDomainName=@DomainName+'':80'' OR 
	SiteDomainName IN 
	(
		SELECT SiteDomainAliasName FROM CMS_SiteDomainAlias WHERE SiteID=@SiteID
		UNION ALL
		SELECT SiteDomainAliasName + '':80'' FROM CMS_SiteDomainAlias WHERE SiteID=@SiteID
	)
)
UNION ALL
SELECT TOP 1 CMS_SiteDomainAlias.SiteID, CMS_SiteDomainAlias.SiteDomainAliasName 
FROM CMS_SiteDomainAlias LEFT JOIN CMS_Site ON CMS_Site.SiteID = CMS_SiteDomainAlias.SiteID 
WHERE CMS_SiteDomainAlias.SiteID != @SiteID AND SiteStatus = ''RUNNING'' AND 
(
	SiteDomainAliasName=@DomainName OR 
	SiteDomainAliasName=@DomainName+'':80'' OR 
	SiteDomainAliasName IN 
	(
		SELECT SiteDomainAliasName FROM CMS_SiteDomainAlias WHERE SiteID=@SiteID
		UNION ALL
		SELECT SiteDomainAliasName + '':80'' FROM CMS_SiteDomainAlias WHERE SiteID=@SiteID
	)
)', 0, 52, 0, '20090723 09:30:33', 'bae1857a-726d-48cd-8cac-ca34d571b8a6', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (374, N'selectrunningsites', 0, N'SELECT * FROM CMS_Site RIGHT OUTER JOIN CMS_SiteDomainAlias ON CMS_Site.SiteID = CMS_SiteDomainAlias.SiteID WHERE SiteStatus=''RUNNING''', 0, 52, 0, '20080313 09:35:00', 'b8c0af63-f7e9-4688-b221-b35056d312f8', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (230, N'selectbyaliaspathandsiteid', 0, N'SELECT * FROM CMS_Tree WHERE NodeSiteID=@NodeSiteID AND NodeAliasPath = @NodeAliasPath', 0, 143, 0, '20080313 09:35:00', 'a45fd7d8-ca6d-4830-adf9-84068c8b86f0', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (280, N'selectbyname', 0, N'SELECT * FROM CMS_PageTemplate WHERE PageTemplateCodeName=@PageTemplateCodeName AND (PageTemplateSiteID=@PageTemplateSiteID OR @PageTemplateSiteID=0)', 0, 157, 0, '20081014 17:42:54', 'e107b2a3-4569-4ba9-a4c6-79bcbb298b80', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (344, N'selectpermission', 0, N'SELECT * FROM CMS_Permission WHERE PermissionName=@PermissionName AND ( (ResourceID IS NULL AND ClassID = @ClassID) OR (ClassID IS NULL AND ResourceID=@ResourceID) )', 0, 131, 0, '20080313 09:35:00', 'f88de101-fa79-4e4e-9d96-a1f226dcd714', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (324, N'selectAllDocument', 0, N'SELECT ##COLUMNS## FROM CMS_Document WHERE ##WHERE## AND DocumentNodeID IN (SELECT NodeID FROM CMS_Tree WHERE NodeSiteID=@SiteID)', 0, 144, 0, '20090429 09:10:36', 'dca89a34-d745-4be8-b5dd-8436e6d56678', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (357, N'selectDomainAliasByName', 0, N'SELECT * FROM CMS_SiteDomainAlias WHERE SiteDomainAliasName=@SiteDomainAliasName AND SiteID IN (SELECT SITEID FROM CMS_SITE WHERE SiteStatus = ''RUNNING'')', 0, 52, 0, '20080313 09:35:00', '65b074a6-fb5e-481a-afcd-e1bc5ceec824', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (362, N'selectsitesperculture', 0, N'SELECT S.* FROM CMS_Site S, CMS_Culture C, CMS_SiteCulture SC WHERE C.CultureCode LIKE @CultureCode AND SC.CultureID = C.CultureID AND S.SiteID = SC.SiteID', 0, 52, 0, '20080313 09:35:00', '3464e383-104d-405e-a5a4-7499ef68b677', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (285, N'selectPageTemplateSiteRelation', 0, N'SELECT * FROM CMS_PageTemplateSite WHERE (PageTemplateID=@PageTemplateID AND SiteID=@SiteID)', 0, 157, 0, '20080313 09:35:00', '9108b679-8037-4828-9e5e-14ce64da7d43', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (424, N'selectallsteps', 0, N'SELECT * FROM CMS_WorkflowStep WHERE ##WHERE## ORDER BY ##ORDERBY## ASC', 0, 171, 0, '20080313 09:35:00', '52ee3e21-2cd0-4223-a00b-eeecedb6ce46', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (439, N'selectlastversionhistory', 0, N'SELECT TOP 1 * FROM CMS_VersionHistory WHERE DocumentID = @DocumentID ORDER BY VersionHistoryID DESC', 0, 214, 0, '20080313 09:35:00', '9539cda7-1c90-4cee-ab38-acdac794e581', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (463, N'selectaclitemsandoperators', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_CMS_ACLItem_ItemsAndOperators WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 225, 0, '20090902 13:18:00', 'cbd681b4-d7ce-4c82-89c7-0c5ad9ca4dbb', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (468, N'selectnodeandacl', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Tree INNER JOIN CMS_ACL ON CMS_ACL.ACLID = CMS_Tree.NodeACLID WHERE CMS_Tree.NodeID = @NodeID', 0, 233, 0, '20091110 11:44:01', 'd62d41ce-61b5-4fc6-b230-785ab7d7e7ec', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (489, N'selectbyaclidanduserid', 0, N'SELECT ##COLUMNS## FROM CMS_ACLItem WHERE ACLID = @ACLID AND UserID = @UserID', 0, 225, 0, '20091110 13:10:24', '8d10b507-9ec0-4fa6-ba60-4143e7d66923', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (491, N'selectbyaclidandroleid', 0, N'SELECT ##COLUMNS## FROM CMS_ACLItem WHERE ACLID = @ACLID AND RoleID = @RoleID', 0, 225, 0, '20091110 13:10:18', '24a64974-4536-4a24-99ec-a15a04b458ec', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (492, N'selectnodesandacls', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Tree INNER JOIN CMS_ACL ON CMS_ACL.ACLID = CMS_Tree.NodeACLID WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 233, 0, '20091110 13:48:14', '782a0225-d14a-4411-9e75-4c20e3c9bc19', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (500, N'selectallscopes', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WorkflowScope INNER JOIN CMS_Site ON CMS_Site.SiteID = CMS_WorkflowScope.ScopeSiteID LEFT OUTER JOIN CMS_Class ON CMS_Class.ClassID = CMS_WorkflowScope.ScopeClassID WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 171, 0, '20100304 13:13:00', '0a82329d-1656-4d09-b607-080c8b1fe2bc', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (502, N'selectdocumenthistory', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WorkflowHistory LEFT OUTER JOIN CMS_User ON CMS_User.UserID = CMS_WorkflowHistory.ApprovedByUserID WHERE VersionHistoryID IN (SELECT VersionHistoryID FROM CMS_VersionHistory WHERE DocumentID = @DocumentID) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 298, 0, '20100303 10:24:07', 'e77bd9c9-8d39-4dfa-8ec6-3a0054f77d3d', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (588, N'selectStepRoles', 0, N'SELECT * FROM CMS_WorkflowStepRoles WHERE StepID=@StepID', 0, 172, 0, '20080313 09:35:00', '6ac5d308-a878-4af6-9233-b52f4d91584c', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (624, N'selectById', 0, N'SELECT * FROM [CMS_Layout] WHERE LayoutID = @LayoutID', 0, 410, 0, '20080313 09:35:00', '2208ac12-f91e-4253-b8e6-d5eab01ea80d', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (667, N'selectByCategoryId', 0, N'SELECT * FROM CMS_WebPart WHERE WebPartCategoryID = @WebPartCategoryId', 0, 425, 0, '20080313 09:35:00', 'e30e16c7-2502-45c8-a73f-df60956eea3c', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (673, N'selectParentWithPageTemplate', 1, N'Proc_CMS_Tree_SelectParentWithPageTemplate', 0, 143, 0, '20080313 09:35:00', '2201a598-8874-4469-8b3e-63a667f13a20', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (720, N'selectincategory', 0, N'SELECT *  FROM [CMS_WebPart] WHERE WebPartCategoryID = @WebPartCategoryID ORDER BY WebPartDisplayName', 0, 425, 0, '20080313 09:35:00', '09307175-6996-456c-9ed3-f53c955bd1b7', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (733, N'selectdescendantcategories', 0, N'SELECT * FROM CMS_PageTemplateCategory WHERE CategoryParentID = @ParentCategoryID OR (@ParentCategoryID = 0 AND CategoryParentID IS NULL) ORDER BY CategoryDisplayName', 0, 405, 0, '20080313 09:35:00', '7477c3e0-1704-4ab8-bca1-1226ff24b23d', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (734, N'selectdescendanttemplates', 0, N'SELECT * FROM CMS_PageTemplate WHERE PageTemplateCategoryID = @ParentCategoryID OR (@ParentCategoryID = 0 AND  PageTemplateCategoryID IS NULL) ORDER BY PageTemplateDisplayName', 0, 405, 0, '20080313 09:35:00', '8a624c6f-b3cf-4a27-a36a-40f873e2555e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (748, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_PageTemplateCategory WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 405, 0, '20091103 08:50:35', 'b7f66864-856d-4028-93ed-dfd069dfe9ca', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (755, N'selectbycode', 0, N'SELECT * FROM [CMS_UICulture] WHERE UICultureCode = @UICultureCode', 0, 490, 0, '20080313 09:35:00', '4036caea-150d-41d4-9c62-33368a4d7dea', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (756, N'selectbyid', 0, N'SELECT * FROM [CMS_UICulture] WHERE UICultureID = @UICultureId', 0, 490, 0, '20080313 09:35:00', '0ea998c1-2028-4813-922a-21e8e001a12f', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (762, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_UICulture WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 490, 0, '20081229 09:07:39', '85437828-11e9-41d9-96d6-a91dd3ae9b79', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (862, N'selectbydocumentid', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Attachment WHERE AttachmentDocumentID = @AttachmentDocumentID', 0, 504, 0, '20090409 16:09:44', '574cadf4-3c92-4dbe-9428-51606286b983', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (871, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_RelationshipName WHERE [RelationshipNameID] = @ID', 0, 530, 0, '20081229 09:07:21', '397482de-a155-47fd-b818-dc46d4c3e462', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (877, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_RelationshipName WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 530, 0, '20081229 09:07:21', '767bb918-e894-48d5-aa23-d8003b0a2bdc', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (884, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_RelationshipNameSite WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 536, 0, '20081229 09:07:21', 'ab70933f-95d6-482d-8116-f4e34b697ba0', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (889, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Relationship WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 537, 0, '20081229 09:07:21', 'f3f6a2ec-0221-4057-ac90-4db89c48551e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (908, N'selectallasnames', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_CMS_Relationship_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 537, 0, '20090831 18:27:35', '9adca54e-faff-42e0-aafe-96a5351b73b3', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (926, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WebPartCategory WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 424, 0, '20090827 15:32:53', '0ff7c1b1-7903-4e0c-938c-5e77c0eb8539', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1107, N'selectdistinctclassnames', 0, N'SELECT DISTINCT ClassName FROM View_CMS_Tree_Joined WHERE (##WHERE##)', 0, 143, 0, '20091109 11:29:14', '8bdd9c19-e951-42ba-97f8-a73f650e00fc', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1110, N'selectByCodeName', 0, N'SELECT  * FROM [CMS_FormUserControl] WHERE UserControlCodeName = @UserControlCodeName', 0, 846, 0, '20080313 09:35:00', '9f6ed2d4-d2d7-4ce1-97ff-baf1cf3fde88', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (930, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_SiteDomainAlias WHERE [SiteDomainAliasID] = @ID', 0, 661, 0, '20081229 09:07:23', 'c6f335d6-e015-44c3-8dcc-5412f93c7443', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (949, N'selectallofsite', 0, N'SELECT * FROM View_CMS_User WHERE ((@SiteID = 0) OR (UserID in (SELECT UserID FROM CMS_UserSite WHERE SiteID = @SiteID))) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 59, 0, '20080313 09:35:00', 'c0f1b751-5b72-404a-87a6-808a3caf4c9e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (954, N'selectNoDocumentTypes', 0, N'SELECT * FROM CMS_Class WHERE ClassIsDocumentType=0 AND ClassName NOT LIKE ''%test%'' ORDER BY ClassDisplayName', 0, 145, 0, '20080313 09:35:00', '0e014f99-6d08-4216-b961-ac1c52a794f6', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (955, N'selectNoNewDocumentTypes', 0, N'SELECT * FROM tmp_class WHERE ClassIsDocumentType=0 ORDER BY ClassDisplayName', 0, 145, 0, '20080313 09:35:00', '1a830204-b0d3-44c6-8d86-02f68cb31200', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1298, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Newsletter_EmailTemplate WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 905, 0, '20081229 09:07:12', '34044c44-5bce-4d08-94a3-7168891368dd', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1313, N'selectbyname', 0, N'SELECT * FROM CMS_InlineControl WHERE ControlName = @Name', 0, 877, 0, '20080313 09:35:00', '7d2686e9-39ef-4d2f-82bc-ba42ebe10668', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1371, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Newsletter_Emails WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 919, 0, '20081229 09:07:13', '94ef7837-b207-4b22-abfa-36ae73513d1e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1373, N'selectblankpageinfo', 0, N'SELECT * FROM View_PageInfo_Blank WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 143, 0, '20080313 09:35:00', '486bc309-5cdc-4f06-a4c0-c43f5dc68edf', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1395, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_LicenseKey WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 930, 0, '20091211 15:01:08', '31f88212-93fc-4f20-93a7-e5d9d21f21f6', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1396, N'selectByLicenseDomain', 0, N'SELECT * FROM CMS_LicenseKey WHERE LicenseDomain = @LicenseDomain', 0, 930, 0, '20080313 09:35:00', 'bd1bba2a-cc91-49ab-af9f-c342be615f81', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1610, N'selectParentSecuredNode', 1, N'Proc_CMS_Tree_SelectParentWithSecuredNode', 0, 143, 0, '20080313 09:35:00', 'b0c9e139-a46b-41f4-890b-15c6716feb5a', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1736, N'SelectVersions', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_CMS_Tree_Joined_Versions WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 144, 0, '20090429 09:11:47', 'b5a25e08-63ff-4084-9122-e66a0918881b', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2190, N'selectForUnigrid', 0, N'SELECT ##TOPN## ##COLUMNS## FROM [CMS_WebFarmServer] INNER JOIN CMS_WebFarmServerTask ON CMS_WebFarmServerTask.ServerID = CMS_WebFarmServer.ServerID LEFT JOIN CMS_WebFarmTask ON CMS_WebFarmServerTask.TaskID = CMS_WebFarmTask.TaskID WHERE (##WHERE##) ORDER BY ##ORDERBY##', 0, 1094, 0, '20100308 11:25:56', '1e286bad-e69d-4d08-8329-4a72a522fb46', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2247, N'selectbyname', 0, N'SELECT * FROM CMS_Layout WHERE LayoutCodeName = @LayoutCodeName', 0, 410, 0, '20080313 09:35:00', '4afb3939-0e69-4389-9ae6-b055daf42918', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1391, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_LicenseKey WHERE [LicenseKeyID] = @ID', 0, 930, 0, '20091211 15:01:08', '879ab520-f1e4-409b-9c33-1b61411932a3', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2045, N'SelectCssForSite', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_CssStylesheet, CMS_CssStylesheetSite WHERE CMS_CssStylesheet.StylesheetID = CMS_CssStylesheetSite.StylesheetID AND CMS_CssStylesheetSite.SiteID = @SiteID ORDER BY ##ORDERBY##', 0, 555, 0, '20090518 14:50:37', '5e6f4e38-dad3-49fb-94e5-b509f85e6898', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2071, N'selectNotAdhoc', 0, N'SELECT * FROM CMS_PageTemplate WHERE PageTemplateIsReusable=1', 0, 157, 0, '20080313 09:35:00', '8ead1646-e8c2-4794-9a69-aa87495dc289', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2088, N'selectalldocumenttypes', 0, N'SELECT * FROM CMS_Class WHERE ClassIsDocumentType=1', 0, 145, 0, '20080313 09:35:00', 'ea37d75e-a479-4858-a56e-c983e1c5802a', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2177, N'selectDomainAliasForSite', 0, N'SELECT * FROM CMS_SiteDomainAlias WHERE SiteID=@SiteID AND SiteDomainAliasName=@SiteDomainAliasName', 0, 52, 0, '20080313 09:35:00', 'ead7e713-2dba-42ed-8f0e-4475066743ac', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2179, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_WebFarmServer WHERE [ServerID] = @ID', 0, 1093, 0, '20081229 09:07:40', '771f2f97-1078-498b-bec1-b100ec6b39a6', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2183, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WebFarmServer WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1093, 0, '20081229 09:07:40', '11b6100d-ce2c-4709-9f5c-00491e56b5b6', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2556, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Staging_Synchronization WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1131, 0, '20081229 09:07:24', 'd5bc7a8e-3089-495b-8f70-a507cc886bbd', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2050, N'selectCategoriesWithAllowedTemplate', 0, N'SELECT DISTINCT CMS_PageTemplateCategory.CategoryID, CMS_PageTemplateCategory.CategoryDisplayName, CMS_PageTemplateCategory.CategoryParentID, CMS_PageTemplateSite.SiteID FROM CMS_PageTemplate INNER JOIN CMS_PageTemplateCategory ON CMS_PageTemplate.PageTemplateCategoryID = CMS_PageTemplateCategory.CategoryID INNER JOIN CMS_PageTemplateSite ON CMS_PageTemplate.PageTemplateID = CMS_PageTemplateSite.PageTemplateID WHERE (CMS_PageTemplateSite.SiteID = @SiteId)  AND (CMS_PageTemplateCategory.CategoryDisplayName <> ''ad-hoc'')  ORDER BY ##ORDERBY##', 0, 405, 0, '20080313 09:35:00', '81401612-4861-4c13-b509-bd94433d5db0', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2485, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Forums_ForumSubscription WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1124, 0, '20081229 09:07:08', '4edc5bcb-7a30-4cf1-baad-f2278051e03c', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2495, N'selectByCountryName', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Country WHERE CountryName = @CountryName', 0, 1125, 0, '20091103 08:47:40', '88a3eab9-cc74-40b4-a6ad-b664bb9dcf28', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2515, N'selectByStateName', 0, N'SELECT * FROM CMS_State WHERE StateName = @StateName', 0, 1126, 0, '20080313 09:35:00', 'd93a686f-d78d-4e2b-99be-9e59c9f4f752', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2522, N'SelectStatesForCountry', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_State WHERE CountryID = @CountryID AND ##WHERE## ORDER BY ##ORDERBY##', 0, 1126, 0, '20090903 12:41:30', '223cb99f-51c7-48ab-ab89-7546ad859870', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2530, N'selectParentCacheNode', 1, N'Proc_CMS_Tree_SelectParentCacheNode', 0, 143, 0, '20080313 09:35:00', '3576d7ab-f7c3-4928-8b51-4601fd737886', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2611, N'fetchtaskstorun', 1, N'Proc_CMS_ScheduledTask_FetchTasksToRun', 0, 909, 0, '20081231 08:50:07', '2f03d3d6-3afb-409f-b075-980d141ab35b', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2765, N'selectolderversions', 0, N'SELECT * FROM CMS_VersionHistory WHERE DocumentID = @DocumentID AND VersionHistoryID NOT IN (SELECT TOP ##WHERE## VersionHistoryID FROM CMS_VersionHistory WHERE DocumentID = @DocumentID ORDER BY VersionHistoryID DESC) AND VersionHistoryID NOT IN (SELECT DocumentPublishedVersionHistoryID FROM CMS_Document WHERE DocumentID = @DocumentID AND DocumentPublishedVersionHistoryID IS NOT NULL)', 0, 214, 0, '20080313 09:35:00', '74975d5b-755b-4d38-a8ab-995d6950a1e4', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3148, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM COM_CurrencyExchangeRate WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1202, 0, '20081229 09:07:00', '6c9859e2-9e99-422f-822a-956d6598f4d0', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3154, N'selectuniquenames', 0, N'SELECT DISTINCT NodeID, NodeAlias, NodeName FROM CMS_Tree WHERE NodeParentID=@NodeParentID AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 143, 0, '20090717 11:38:01', 'c6c496ac-9aac-4ee6-b8a8-8baac05e305b', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3281, N'selectParentSSLNode', 1, N'Proc_CMS_Tree_SelectParentWithSSLNode', 0, 143, 0, '20080313 09:35:00', 'cc9416eb-7977-47d9-b348-1051901c6f28', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3340, N'select', 0, N'SELECT ##COLUMNS## FROM Polls_PollAnswer WHERE [AnswerID] = @ID', 0, 1331, 0, '20090102 11:33:18', '713a5922-8baa-439e-a517-00caef6242a0', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3419, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Reporting_ReportValue WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1342, 0, '20081229 09:07:22', '0cc3aaad-7f94-4197-8dbf-06c295c726da', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3374, N'selectsites', 0, N'SELECT * FROM CMS_Site INNER JOIN Polls_PollSite ON CMS_Site.SiteID=Polls_PollSite.SiteID WHERE Polls_PollSite.PollID=@PollID', 0, 1330, 0, '20090102 11:36:05', '5f10622f-30c7-4fa4-9045-d4f215b31a64', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3399, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Reporting_Report WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1338, 0, '20100325 18:30:53', '4f63e150-3e2d-45f8-9bed-fb9793a7aeb9', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3414, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Reporting_ReportTable WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1341, 0, '20081229 09:07:22', '0a149bfb-7c3d-48dc-8783-44657a1b868c', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3478, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Reporting_SavedReport WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1350, 0, '20081229 09:07:21', 'd8387baf-a426-4665-bd32-05333e211710', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3552, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Blog_Comment WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1360, 0, '20090107 14:29:28', '3cdef510-b79e-4b10-8a69-a5333e547fcd', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3674, N'selectforpost', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Blog_Comment WHERE CommentPostDocumentID = @CommentPostDocumentID AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 1360, 0, '20091103 08:46:43', '36a16c41-af00-4c74-8fb6-e0fdbc5d42ae', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3798, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM COM_VolumeDiscount WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1424, 0, '20081229 09:07:03', '06aa75b5-01fd-454b-94da-cb9c338918a4', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3920, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WorkflowStep WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 172, 0, '20081229 09:07:41', '572119d6-ab5a-4133-a7ae-5ed7d759fdd2', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3973, N'selectcountrieswithstates', 0, N'SELECT DISTINCT ##TOPN## CMS_Country.* FROM CMS_Country,CMS_State WHERE CMS_Country.CountryID=CMS_State.CountryID;', 0, 1125, 0, '20091103 08:49:17', '5ac4d77d-ac27-4a5f-8b49-0c6f86995dcd', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4150, N'selectpageinfonoorder', 0, N'SELECT ##TOPN## * FROM View_PageInfo WHERE (##WHERE##)', 0, 143, 0, '20090819 19:04:39', 'd823864c-458f-4296-9ff3-55f906f5bec3', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4508, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_Relationship WHERE [LeftNodeID] = @LeftNodeID AND [RightNodeID] = @RightNodeID AND [RelationshipNameID] = @RelationshipNameID', 0, 537, 0, '20081229 09:07:21', 'a48f19a0-2c61-4896-9561-392cdc3b43e0', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4221, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Events_Attendee WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1511, 0, '20081229 09:07:06', 'fe055370-25e5-4f06-9729-7c385d485d94', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4441, N'selectbyguid', 0, N'SELECT * FROM CMS_MetaFile WHERE [MetaFileGUID] = @Guid', 0, 1527, 0, '20080313 09:35:00', '37bde357-3da1-4eb8-9b83-73f34303953a', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4685, N'select', 0, N'SELECT * FROM CMS_ObjectRelationship WHERE [RelationshipLeftObjectID] = @leftID AND [RelationshipLeftObjectType] = @leftType AND [RelationshipRightObjectID] = @rightID AND [RelationshipRightObjectType] = @rightType AND [RelationshipNameID] = @relationshipNameID', 0, 1594, 1, '20080313 09:35:00', '13ac4e1f-9290-4ed9-b3e4-3ceea8221127', 0, 1)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4689, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_ObjectRelationship WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1594, 0, '20081229 09:07:13', '34227368-14f6-4fab-8efa-c359b23cb879', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4696, N'selectlistofuser', 0, N'SELECT CMS_User.UserID, CMS_User.UserName FROM CMS_User JOIN CMS_ObjectRelationship ON CMS_ObjectRelationship.RelationshipLeftObjectID = CMS_User.UserID WHERE (CMS_ObjectRelationship.RelationshipLeftObjectType=@ObjectType AND CMS_ObjectRelationship.RelationshipRightObjectType=@ObjectType AND CMS_ObjectRelationship.RelationshipNameID = @RelationshipID AND CMS_ObjectRelationship.RelationshipRightObjectID = @CurrentUserID)', 0, 59, 0, '20080313 09:35:00', 'e013bf75-4c18-46e1-ab04-7bf2eb54d872', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4728, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_Resource WHERE [ResourceID] = @ID', 0, 134, 0, '20091124 19:02:33', '8deefe4f-3437-48c4-b632-59af2aa3422c', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4729, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_UICulture WHERE [UICultureID] = @ID', 0, 490, 0, '20081229 09:07:39', 'cce051e8-7138-42df-bad1-a2deab3372ca', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4777, N'selectculturesites', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_CMS_SiteCulture_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1, 0, '20091103 08:51:30', 'c1251a82-377c-48dd-9dfc-d3d96e24b7dc', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4812, N'selectbynameandsiteid', 0, N'SELECT * FROM CMS_Role WHERE RoleName = @RoleName AND ((SiteID IS NULL AND @SiteID = 0) OR (SiteID = @SiteID))', 0, 56, 0, '20080313 09:35:00', '54ae8850-e81a-45a5-a7b6-9b5bc0adf88a', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4816, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_SiteDomainAlias WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 661, 0, '20081229 09:07:23', '1a00a32e-56c8-4898-8283-7a27b0265495', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4855, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_RelationshipName WHERE (RelationshipLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 530, 0, '20090819 18:55:43', '8b51d762-58a6-4ed5-a8fe-00e9afd8e61b', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4856, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Resource WHERE (ResourceLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 134, 0, '20091124 19:02:33', 'af3ea5b3-41b4-47e2-a4d0-2846d5966c38', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4903, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_PageTemplateCategory WHERE [CategoryID] = @ID', 0, 405, 0, '20091103 08:50:35', '7b960d4e-660f-4f64-86e5-4393f05e9172', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4913, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Export_Task WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1617, 0, '20081229 09:07:06', '2ea3ff30-f77d-4d0a-82fb-c9e6ea7b7bc7', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4929, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WebFarmServer WHERE (ServerLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 1093, 0, '20080313 09:35:00', '410cac5a-1cdd-4f1d-ba9a-ffac0b3537fe', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5000, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_PageTemplateCategory WHERE (CategoryLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 405, 0, '20091103 08:50:35', 'e3f72a4d-9a92-4cbd-a7a2-a008d97dd395', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5002, N'selectmodifiedfrom', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WebPartCategory WHERE (CategoryLastModified >= @ModifiedFrom) AND (##WHERE##) ORDER BY ##ORDERBY##', 0, 424, 0, '20090827 15:32:53', '914533b2-8667-4604-adc1-acc49f7fb1bf', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4908, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Export_History WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1616, 0, '20081229 09:07:06', '55de2743-5a3e-4fcb-80b9-ff9db538b724', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5022, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_Query WHERE [QueryID] = @ID', 0, 161, 0, '20090102 14:02:46', '597ca631-b050-4418-956e-f9c5f3bf23a8', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5026, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_Query WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 161, 0, '20090102 14:02:46', 'c74ad227-aa70-4724-a07e-f4a40929b996', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5064, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_PageTemplateSite WHERE [PageTemplateID] = @PageTemplateID AND [SiteID] = @SiteID', 0, 1631, 0, '20081229 09:07:15', '1b480885-b6a1-4448-a99f-7cbf99f043ac', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5100, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_ResourceSite WHERE [ResourceID] = @ResourceID AND [SiteID] = @SiteID', 0, 1632, 0, '20081229 09:07:22', 'bc38debd-0009-437a-b34b-86b56862e9ae', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5104, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_ResourceSite WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1632, 0, '20081229 09:07:22', 'cfba236e-ef73-4b00-a9f9-3d14ce37ef78', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5105, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_SiteCulture WHERE [SiteID] = @SiteID AND [CultureID] = @CultureID', 0, 1633, 0, '20081229 09:06:58', '067c31ba-4218-4a03-8dc9-31be66ee898f', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5109, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_SiteCulture WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1633, 0, '20081229 09:06:59', '00fc2465-7a7a-4c24-92ff-ac77863b12aa', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5120, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_WorkflowStepRoles WHERE [StepID] = @StepID AND [RoleID] = @RoleID', 0, 1635, 0, '20081229 09:07:41', '97c143a3-9189-45e2-b801-2b3bc46e9560', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5124, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WorkflowStepRoles WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1635, 0, '20081229 09:07:41', '09b7b3e2-c854-4de3-9e92-53e83f2684c1', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5068, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_PageTemplateSite WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1631, 0, '20081229 09:07:15', '9c853dfe-ee42-4690-a61d-42f71811e79f', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5069, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_RelationshipNameSite WHERE [RelationshipNameID] = @RelationshipNameID AND [SiteID] = @SiteID', 0, 536, 0, '20081229 09:07:21', '8c31de16-3871-4914-b0d1-8862bc68bd6a', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5148, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM COM_DiscountLevelDepartment WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1636, 0, '20081229 09:06:59', 'b245bc54-a664-46c0-9b60-28639baf8533', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5149, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_ClassSite WHERE [ClassID] = @ClassID AND [SiteID] = @SiteID', 0, 1637, 0, '20081229 09:06:58', '52cf8a71-3d04-4d0b-aa52-2549504c9698', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5173, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM COM_SKUDiscountCoupon WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1640, 0, '20081229 09:07:23', '37b5e269-6d69-4ecf-b05f-390786f4d116', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5178, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM COM_SKUOptionCategory WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1641, 0, '20081229 09:07:24', '1e5ab305-1f5c-4cfa-a898-9d06cc4aa39b', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5183, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM COM_SKUTaxClasses WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1642, 0, '20081229 09:07:24', '0e11aec4-0488-492f-87cb-b89b99a9242e', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5189, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM COM_UserDepartment WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1643, 0, '20081229 09:07:40', '7bdfb5c5-3615-43d2-b74f-78751a312527', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5194, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Forums_ForumRoles WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1644, 0, '20081229 09:07:08', 'e82a71e7-75f6-41c8-9bdc-3d059c511f91', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5220, N'selectallids', 0, N'SELECT EmailID FROM Newsletter_Emails WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 919, 0, '20080313 09:35:00', '0d0cb30f-e573-48e6-b69d-c8a034985f9c', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5222, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_ACLItem WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 225, 0, '20081229 09:06:53', '607c08d7-9af8-4797-b855-40edfe0c8594', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5228, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_RolePermission WHERE [RoleID] = @RoleID AND [PermissionID] = @PermissionID', 0, 1648, 0, '20081229 09:07:22', 'c214042c-afac-4ae7-95e1-040a3184f9e5', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5199, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM Polls_PollRoles WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1645, 0, '20081229 09:07:16', '83606602-9295-45df-a37f-96e6dda737c1', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5232, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_RolePermission WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1648, 0, '20081229 09:07:22', '5af8c00d-d0b9-4d3a-98d2-c45f885fd1af', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5241, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_ResourceString WHERE [StringID] = @ID', 0, 1650, 0, '20090106 11:28:40', '9b16a5e9-a069-4273-b1e9-48b253e5cbaa', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5245, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_ResourceString WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1650, 0, '20090106 11:28:41', 'a3d36282-eefc-4f04-a5dd-c3bdc23a3b24', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5246, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_ResourceTranslation WHERE [TranslationID] = @ID', 0, 1651, 0, '20081229 09:07:22', 'aa6b0e0e-d096-4649-8071-b305d1608065', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5250, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_ResourceTranslation WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1651, 0, '20081229 09:07:22', 'ba32a5bd-2bee-4450-8a1d-20bef61a96a2', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5269, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_VersionAttachment WHERE [VersionHistoryID] = @VersionHistoryID AND [AttachmentHistoryID] = @AttachmentHistoryID', 0, 1658, 0, '20081229 09:07:40', '2951c524-1d40-40e0-98a9-a8f105337a96', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5273, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_VersionAttachment WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1658, 0, '20081229 09:07:40', '1da9e926-0015-4b66-8e7f-f0bae7ff11a6', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5339, N'selectsitelist', 0, N'SELECT CMS_PageTemplateCategory.*, (SELECT COUNT(PageTemplateID) FROM CMS_PageTemplate WHERE PageTemplateID IN (SELECT PageTemplateID FROM CMS_PageTemplateSite WHERE SiteID=@SiteID) AND CMS_PageTemplate.PageTemplateCategoryID=CMS_PageTemplateCategory.CategoryID) AS PageTemplateCount FROM CMS_PageTemplateCategory WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 405, 0, '20080402 00:00:00', '64b959d5-ca01-4aab-a467-ad473346e04a', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5417, N'clearsendingstatus', 0, N'UPDATE Newsletter_Emails SET EmailSending = NULL WHERE EmailSending = 1', 0, 919, 0, '20081231 15:14:57', '4d044efe-1c53-4e8d-a5d4-0357b3a1f6ad', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5422, N'selectcount', 0, N'SELECT COUNT(*) FROM Events_Attendee WHERE ##WHERE##', 0, 1511, 0, '20080424 16:00:00', '2598cd40-c74b-45ab-aa09-5b3a49ffcbb1', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5463, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_WebPartContainerSite WHERE [ContainerID] = @ContainerID AND [SiteID] = @SiteID', 0, 1682, 0, '20081229 09:07:41', 'ef840f3e-550c-4953-b631-3f8cb1d97b5d', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5433, N'selectuppertree', 0, N'SELECT ##TOPN## ##COLUMNS## FROM View_CMS_Tree_Joined WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 143, 0, '20080912 16:41:40', '88957e41-2dcf-4bf4-a691-b9de131738c8', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5467, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_WebPartContainerSite WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1682, 0, '20081229 09:07:41', 'cead6919-0120-492e-bd74-2e0cd4537d54', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5474, N'selectForSite', 0, N'SELECT * FROM CMS_WebPartContainer LEFT JOIN CMS_WebPartContainerSite ON CMS_WebPartContainer.ContainerID = CMS_WebPartContainerSite.ContainerID WHERE SiteID = @ID', 0, 929, 0, '20080505 00:00:00', 'aff63d5a-1aff-4b8f-bbdd-35bf437161d3', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5483, N'selectitemscount', 0, N'SELECT COUNT(*) FROM CMS_EventLog WHERE ##WHERE##', 0, 140, 0, '20080512 16:16:27', '59d5766d-c4a5-4fa3-8632-a4d3a2f7ecd1', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6037, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM COM_DepartmentTaxClass WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1720, 0, '20081229 09:07:00', '31fbbaee-cb62-4ab9-8045-7ac25408cb0a', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6043, N'selectByCategoryName', 0, N'SELECT * FROM CMS_Category WHERE CategoryName = @CategoryName', 0, 1721, 0, '20080730 11:31:36', '98b4af95-ecf1-4d09-8456-117204d6ceef', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6028, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_DocumentAlias WHERE [AliasID] = @ID', 0, 1719, 0, '20100322 15:37:58', '9733e8cd-1041-41d9-ada4-be7e8ba1d986', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6074, N'select', 0, N'SELECT ##COLUMNS## FROM CMS_DocumentCategory WHERE [DocumentID] = @DocumentID AND [CategoryID] = @CategoryID', 0, 1726, 0, '20081229 09:06:59', '595715ae-c090-47c7-ba85-c98fed1345ef', 0, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6078, N'selectall', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_DocumentCategory WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 1726, 0, '20081229 09:06:59', 'd9c4e1af-0427-4fba-a94f-4460fcd5dfd8', 0, NULL)
SET IDENTITY_INSERT [CMS_Query] OFF
